package customerEnter.Frame.JDBCDao.UseQuery;

import org.springframework.jdbc.support.rowset.SqlRowSet;

import customerEnter.Frame.DaoDataTransmission.DaoFramePameTransmission;
import customerEnter.Frame.JDBCDao.Interface.DaoFrameUseTypeInterface;
import customerEnter.Frame.Utils.Log4j;

public class DaoFrameUseTypeintImpl implements DaoFrameUseTypeInterface<Integer> {

	public <T, K> Integer useDaoFrameDataType(DaoFramePameTransmission<T, K> daoFramePameTransmission) {
		// ResultSet sqlRowSet = null;
		// sqlRowSet = daoFramePameTransmission.getRs();
		SqlRowSet sqlRowSet = daoFramePameTransmission.sqlRowSet;
		Integer integer = 0;
		try {
			while (sqlRowSet.next()) {
				integer = sqlRowSet.getInt(1);
				break;
			}
		} catch (Exception e) {
			Log4j.setLog4j(getClass());
			Log4j.Log4JOutError(e.getMessage());
		}
		return integer;
	}
}
